import {
  request
} from '../utils/request.js'

// 获取信息列表
export function getReadList(data) {
  return request({
    // url: '/app/zfjlyEquipment/getAppZfjlyEquipmentNews',
    url: '/app/zfjlyNews/getAppZfjlyEquipmentNews',
    method: 'POST',
    data
  })
}

// 获取信息内容
export function getInfoDetail(id) {
  return request({
    // url: `/app/zfjlyEquipment/getAppZfjlyEquipment/${id}`,
    url: `/app/zfjlyNews/getAppZfjlyNews/${id}`,
    method: 'POST',
  })
}



// export function changeStatus(id) {
//   return request({
//     url: `/app/zfjlyEquipment/updateAppZfjlyEquipmentNewsRead/${id}`,
//     method: 'POST'
//   })
// }

// 更改信息已读状态
export function changeStatus(data) {
  return request({
    url: '/app/zfjlyNews/updateZfjlyNewsIsRead',
    method: 'POST',
    data
  })
}

// 向服务器发送消息(图片与视频需要先上传)
export function sendToCom(data) {
  return request({
    url: '/app/zfjlyNews/sendNew',
    method: 'POST',
    data
  })
}

// 建立SSE连接
export function connectSSE(id) {
  return request({
    url: `/app/sse/connect/${userId}`,
    respon
  })
}